/*************************************************************************
 *                                                                       *
 * This file is part of the FreeMAPs distribution.  For full copyright   *
 * information, see COPYRIGHT and COPYING.LESSER.                        *
 *                                                                       *
 * Author:           sqbang                                              *
 * Email:            sqbang@ustc.edu                                     *
 * Date:             2016.01.31                                          *
 *                                                                       *
 *************************************************************************/

#ifndef FreeMAPs_include_COMMON_equa_ElasticMechanicsEquationEnsemble_h
#define FreeMAPs_include_COMMON_equa_ElasticMechanicsEquationEnsemble_h

#include "FreeMAPsConfig.h"

//LIBMESH headers

//COMMON headers
#include "COMMON/base/Common.h"
#include "COMMON/enum/PlaneStructualType.h"
#include "COMMON/equa/PDEEquationEnsembleStrategy.h"

namespace FreeMAPs
{

/**
 * @brief ElasticMechanicsEquationEnsemble used to solve elastic mechanism problem.
 */
class ElasticMechanicsEquationEnsemble : public PDEEquationEnsembleStrategy
{
public:

    ElasticMechanicsEquationEnsemble (
        const std::string& parent_name,
        const std::string& object_name/*,
        const int sys_id*/);

    virtual
    ~ElasticMechanicsEquationEnsemble ();

public:

    inline EquationEnsembleType
    get_equation_ensemble_type() const;

    inline int
    get_max_temporal_order() const;

    inline int
    get_num_of_stored_solutions() const;

    inline int
    get_ghost_width () const;

    inline bool
    is_steady() const;



public:
    void
    get_info_for_derived_object_from_input (
        const InputDatabase* db);

    std::string
    get_info_from_derived_object() const;



private:

    typedef PDEEquationEnsembleStrategy Parent;

    /*
     * used in 2d, decided it is a stress, strain plate or shell problem.
     */
    PlaneStructualType d_plane_structual_type;

    /*
     * the variable is in VariableInfo, so do not manager the memory.
     * it's order is mx, my, mz, nx, ny, nz...
     */
    Variable* d_var_displacement;        //we use displacement as variable.
    Variable* d_var_strain;
    Variable* d_var_stress;

    std::string d_coef_young_modulus_xx_name;
    std::string d_coef_young_modulus_yy_name;
    std::string d_coef_young_modulus_zz_name;

    std::string d_coef_poisson_ratio_xy_name;
    std::string d_coef_poisson_ratio_yz_name;
    std::string d_coef_poisson_ratio_zx_name;

    std::string d_coef_shear_modulus_xy_name;
    std::string d_coef_shear_modulus_yz_name;
    std::string d_coef_shear_modulus_zx_name;

    std::string d_coef_thermal_expansion_coef_x_name;
    std::string d_coef_thermal_expansion_coef_y_name;
    std::string d_coef_thermal_expansion_coef_z_name;

private:

    DISALLOW_COPY_AND_ASSIGN (ElasticMechanicsEquationEnsemble);
};

}

#include "COMMON/equa/ElasticMechanicsEquationEnsemble.inl"

#endif
